<?xml version="1.0" encoding="UTF-8"?>
<ui:composition template="/WEB-INF/templates/portalTemplate.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:my="http://java.sun.com/jsf/composite/components">
	<ui:define name="content">
		<h:form>
			<rich:panel header="Moi uczniowie">
				<h:messages infoClass="messageInfo" warnClass="messageWarn" />



				<rich:dataTable id="tabela" value="#{myStudentsBrowser.students}"
					var="_row">
					<rich:column id="col1" style="width:350px">
						<f:facet name="header">Uczeń</f:facet>
						<h:outputText value="#{_row.fullName}" />
					</rich:column>

					<rich:column id="col3">
						<f:facet name="header">Wiek</f:facet>
						<h:outputText value="#{_row.age}" />
					</rich:column>


					<rich:column id="col2">
						<f:facet name="header">Operacja</f:facet>
						<a4j:commandButton value="Pokaż info" styleClass="buttonSmall"
							action="#{userInfoPopup.load(_row.id)}" render="userInfoPopup"
							oncomplete="#{rich:component('userInfoPopup')}.show(); return false;" />

						<a4j:commandButton id="button"
							action="#{myStudentsBrowser.progres()}" immediate="true"
							value="Postępy" styleClass="buttonSmall" render="@form"
							execute="@this">
							<a4j:param value="#{_row.id }"
								assignTo="#{myStudentsBrowser.selectedId}" />
						</a4j:commandButton>


					</rich:column>

				</rich:dataTable>




			</rich:panel>
		</h:form>
		<ui:include src="/components/userInfo.xhtml" />
	</ui:define>
</ui:composition>
